﻿<%@ Page Language="C#" MasterPageFile="~/Home/HomePage.master" AutoEventWireup="true"
    CodeFile="MyOrders.aspx.cs" Inherits="Home_MyOrders" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Head" ContentPlaceHolderID="Head" runat="Server">
    <title>我的订单</title>
     <script type="text/javascript" src="/home/Js/MyOrders.js"></script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="Server">
      <div class="form_sear">
              <select> 
                <option>最近一个月订单</option>
                <option>最近一个月订单</option>
                <option>最近一个月订单</option>
                <option>最近一个月订单</option>
              </select>
              <select> 
                <option>最近一个月订单</option>
                <option>最近一个月订单</option>
                <option>最近一个月订单</option>
                <option>最近一个月订单</option>
              </select>
              <input type="text" value="商品名称、 商品编号、 订单编号" class="p_text_bord"/>
              <input type="button" value=" "  class="btn_sear" />
              </div>

              <table width="100%" border="0" cellspacing="0" cellpadding="0" class="my_center">
                  <tr class="list_bg4">
                  <th height="38">订单编号</th>
                  <th>订单商品</th>
                  <th>收货人</th>
                  <th>订单金额</th>
                  <th>下单时间</th>
                  <th>订单状态</th>
                  <th>操作</th>
                  </tr>

                  <%
                      if (listOfOrder != null)
                      {
                          for (int i = 0; i < listOfOrder.Count; ++i)
                          {
                              OrderInfo o = listOfOrder[i];
                  %>
                  <tr>
                  <td align="center" class="pl5"><a href="OrderInfo.aspx?OrderID=<%=o.Order.OrderID %>" class="blue3" target="_blank"><%=o.Order.OrderID %></a></td>
                  <td align="center">
                      <%
                          for (int j = 0; j < o.Lines.Count; ++j)
                          {
                           %>
                    <a href="/Goods/<%=o.Lines[j].LineInfo.GoodsID %>.html" title="<%=o.Lines[j].GoodsName %>" target="_blank">
                    <img src="<%=o.Lines[j].SuperSmallPictureUrl %>" /></a>
                    </a>
                     <%} %>
                  </td>
                  <td align="center"><%=o.Order.ReceiverName %></td>
                  <td align="right" class="red_bold"><%=Utility.FormatMoneyStr(o.Order.TotalAmount) %>元</td>
                  <td align="center"><%=o.Order.OrderDate.ToString("yyyy-MM-dd") %></td>
                  <td align="center" class="hui_bold"><%=o.Order.OrderStatus %></td>
                  <td align="center">
                  
                  <%
                      if (o.Order.OrderStatus == OrderStatus.等待付款.ToString())
                      {
                   %>
                   <a href="/Home/Pay/Alipay.aspx?orderid=<%=o.Order.OrderID %>" target="_blank" class="blue3">付款</a>
                  <a href="javascript:Cancel(<%=o.Order.OrderID %>);" class="blue3">取消</a><br/>
                  <%} %>
                  
                  <a href="OrderInfo.aspx?OrderID=<%=o.Order.OrderID %>" class="blue3" target="_blank">查看</a></td>
                  </tr>
                  <%} %>
                  <td align="center" colspan="7" class="pl5" style=" height:25px;">
                  <span class="page2" >
         <%=Utility.GetPageLine(Utility.GetWebPageUrlNoCurPage(), asPage.CurPage, asPage.PageSize, 10, asPage.TotalCount)%>        </span>
         </td>
                  <%}
                      else
                      { %>
                       <tr class="no_bord">
                  <td align="center" colspan="7" class="pl5" style=" height:25px;">[ 您还没有下过订单！ ]</td>
                
              </tr>
                      <%
                      }
                      %>
         


              </table>
</asp:Content>
